package com.yxuan.springboot.mapper;

import com.yxuan.springboot.model.BaseSchoolInformation;
import com.yxuan.springboot.model.SchoolInformation;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import org.apache.ibatis.annotations.Mapper;

/**
 * 
 * @author zchao
 *    SchoolInformationMapper层
 * @date 2023-05-09 08:56:35
 */
@Mapper
public interface SchoolInformationMapper extends BaseMapper<SchoolInformation> {

    List<BaseSchoolInformation> queryBaseListByPramas(
            @Param("provinces") List<String> provinces,
            @Param("natures") List<String> natures,
            @Param("gradations") List<String> gradations,
            @Param("schoolTypes") List<String> schoolTypes,
            @Param("eryaoyao") String eryaoyao,
            @Param("jiubawu") String jiubawu,
            @Param("doubleFirst") String doubleFirst,
            @Param("schoolName") String schoolName);

    // 获取省份
    @Select("select id,province from school_information group by province")
    List<SchoolInformation> getProvinceByGroup();
    // 获取办学层次
    @Select("select id,gradation from school_information group by gradation")
    List<SchoolInformation> getGradationByGroup();
    // 获取学校类型
    @Select("select id,school_type schoolType from school_information group by school_type")
    List<SchoolInformation> getSchoolTypeByGroup();
    // 获取办学性质
    @Select("select id,nature from school_information group by nature")
    List<SchoolInformation> getNatureByGroup();

    List<BaseSchoolInformation> queryByProfessionalID(@Param("professionalID") Long professionalID);

    List<SchoolInformation> querySchoolInfoById(List item);

    List<SchoolInformation> querySchoolInfoByIdMoreInfor(List item);

    List<BaseSchoolInformation> queryFocusByUserID(@Param("userID") Integer userID);
}
